<?php
Yii::import('zii.widgets.CPortlet');

class TopBar extends CPortlet
{
    protected function renderContent(){                
        if(!isset($_SESSION['user_pm'])){
            $data = null;
        }else{
            $data = Project::getRowByAdminId($_SESSION['user_pm']['user_id']);
            $data_member = Member::getProjectsByUserId($_SESSION['user_pm']['user_id']);
        }                 
        
        $this->render("top_bar",array("data"=>$data,"data_member"=>$data_member));
    }
}